package com.bonc.rms.dao.impl.tms;

import java.sql.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.bonc.rms.dao.tms.IOrganizationDao;
import com.bonc.rms.mapper.OrganizationMapper;

@Repository
public class OrganizationDaoImpl implements IOrganizationDao{

	@Autowired
	OrganizationMapper organizationMapper;
	
	@Override
	public List<Map<String, Object>> getOrganizationById(Integer depId, Date date) {
		return organizationMapper.getOrganizationById(depId, date);
	}

	@Override
	public List<Map<String, Object>> getOrganizationByParentId(Integer depId, Date date) {
		return organizationMapper.getOrganizationByParentId(depId, date);
	}

	@Override
	public List<String> getHistoryDate() {
		return organizationMapper.getHistoryDate();
	}

	@Override
	public boolean isLeaf(Integer depId) {
		return organizationMapper.isLeaf(depId) == 1 ? true : false;
	}

}
